package org.sapling.data.config;

import org.sapling.data.dao.DataCatchRepository;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 
* @ClassName: InitConfig  
* @Description: 程序入口
* @author DcfZero 
* @date 2020年5月31日  
*
 */
@Order(1)
@Component
public class InitConfig implements ApplicationRunner{
	private static final Logger log = org.slf4j.LoggerFactory.getLogger(ApplicationRunner.class);
	
	@Autowired
	private DataCatchRepository dataCatchRepository;
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		log.info("=====================init DataCatch start....=========================");
		dataCatchRepository.init();
		log.info("=====================init DataCatch end....===========================");
	}
	
}
